package com.sweet.web.verticle;

import com.sweet.web.ApiHandler;
import com.sweet.web.RouterVerticle;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.http.HttpMethod;

import java.time.LocalDateTime;

public class PhoneVerticle extends AbstractVerticle implements RouterVerticle {

  @Override
  public void start() throws Exception {
    super.start();
    routers.add(new ApiHandler(HttpMethod.GET, "/p1", res -> {
      System.out.println(LocalDateTime.now());
      System.out.println(vertx.toString());
      res.response().end(LocalDateTime.now() + " /p1");
    }));
  }
}
